package com.llkj.qingnianguoxue.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.llkj.qingnianguoxue.R;
import com.llkj.qingnianguoxue.bean.WorkListBean;
import com.llkj.qingnianguoxue.util.ImageLoadingUtil;

import java.util.List;

/**
 * 演唱作品
 */
public class WorkListAdapter extends BaseQuickAdapter<WorkListBean, BaseViewHolder> {

    public WorkListAdapter(int layoutResId, List<WorkListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, WorkListBean item) {
        ImageView ivVideoPic = baseViewHolder.getView(R.id.pic);
        ImageLoadingUtil.loadImgGlideRoundCenterCrop(ivVideoPic,item.getBg_img());
        baseViewHolder.setText(R.id.tv_title,item.getName());//标题
//        baseViewHolder.setText(R.id.tv_duration,);//播放时长
        baseViewHolder.setText(R.id.tv_date,item.getAddtime());//发布时间
    }

}
